<template>
  <div class="home-weekend">
    <h1 class="title">周末去哪儿</h1>
    <ul class="list">
      <li class="item border-bottom" v-for="weekend in list" :key="weekend.id">
        <div class="img">
          <img :src="weekend.imgUrl">
        </div>
        <div class="info">
          <h2 class="item-title">{{ weekend.title }}</h2>
          <p class="item-desc">{{ weekend.desc }}</p>
        </div>
      </li>
    </ul>
  </div>
</template>

<script>
export default {
  name: 'home-weekend',
  props: {
    list: Array
  }
}
</script>

<style lang="stylus" scoped>
@import '~styles/mixins.styl';

.home-weekend
  .title
    line-height .8rem
    background #eee
    text-indent .2rem
  .list
    .item
      .img
        height 0
        padding-bottom 37.4375%
        overflow hidden
        img 
          display block
          width 100%
      .info
        padding .1rem
        .item-title
          line-height .54rem
          font-size .32rem
          elipsis()
        .item-desc
          line-height .4rem
          color #ccc
          elipsis()
</style>